package org.jnativehook.keyboard;

import java.awt.Toolkit;
import org.jnativehook.GlobalScreen;
import org.jnativehook.NativeInputEvent;

public class NativeKeyEvent extends NativeInputEvent
{
  private static final long serialVersionUID = 5228137904514960737L;
  private int rawCode;
  private int keyCode;
  private int keyLocation;
  public static final int NATIVE_KEY_FIRST = 2400;
  public static final int NATIVE_KEY_LAST = 2401;
  public static final int NATIVE_KEY_PRESSED = 2400;
  public static final int NATIVE_KEY_RELEASED = 2401;
  public static final int KEY_LOCATION_UNKNOWN = 0;
  public static final int KEY_LOCATION_STANDARD = 1;
  public static final int KEY_LOCATION_LEFT = 2;
  public static final int KEY_LOCATION_RIGHT = 3;
  public static final int KEY_LOCATION_NUMPAD = 4;
  public static final int VK_ENTER = 10;
  public static final int VK_BACK_SPACE = 8;
  public static final int VK_TAB = 9;
  public static final int VK_SHIFT = 16;
  public static final int VK_CONTROL = 17;
  public static final int VK_ALT = 18;
  public static final int VK_META = 157;
  public static final int VK_WINDOWS = 524;
  public static final int VK_CONTEXT_MENU = 525;
  public static final int VK_PAUSE = 19;
  public static final int VK_CAPS_LOCK = 20;
  public static final int VK_ESCAPE = 27;
  public static final int VK_SPACE = 32;
  public static final int VK_UP = 38;
  public static final int VK_DOWN = 40;
  public static final int VK_LEFT = 37;
  public static final int VK_RIGHT = 39;
  public static final int VK_COMMA = 44;
  public static final int VK_MINUS = 45;
  public static final int VK_PERIOD = 46;
  public static final int VK_SLASH = 47;
  public static final int VK_0 = 48;
  public static final int VK_1 = 49;
  public static final int VK_2 = 50;
  public static final int VK_3 = 51;
  public static final int VK_4 = 52;
  public static final int VK_5 = 53;
  public static final int VK_6 = 54;
  public static final int VK_7 = 55;
  public static final int VK_8 = 56;
  public static final int VK_9 = 57;
  public static final int VK_EQUALS = 61;
  public static final int VK_SEMICOLON = 59;
  public static final int VK_A = 65;
  public static final int VK_B = 66;
  public static final int VK_C = 67;
  public static final int VK_D = 68;
  public static final int VK_E = 69;
  public static final int VK_F = 70;
  public static final int VK_G = 71;
  public static final int VK_H = 72;
  public static final int VK_I = 73;
  public static final int VK_J = 74;
  public static final int VK_K = 75;
  public static final int VK_L = 76;
  public static final int VK_M = 77;
  public static final int VK_N = 78;
  public static final int VK_O = 79;
  public static final int VK_P = 80;
  public static final int VK_Q = 81;
  public static final int VK_R = 82;
  public static final int VK_S = 83;
  public static final int VK_T = 84;
  public static final int VK_U = 85;
  public static final int VK_V = 86;
  public static final int VK_W = 87;
  public static final int VK_X = 88;
  public static final int VK_Y = 89;
  public static final int VK_Z = 90;
  public static final int VK_OPEN_BRACKET = 91;
  public static final int VK_BACK_SLASH = 92;
  public static final int VK_CLOSE_BRACKET = 93;
  public static final int VK_NUMPAD0 = 96;
  public static final int VK_NUMPAD1 = 97;
  public static final int VK_NUMPAD2 = 98;
  public static final int VK_NUMPAD3 = 99;
  public static final int VK_NUMPAD4 = 100;
  public static final int VK_NUMPAD5 = 101;
  public static final int VK_NUMPAD6 = 102;
  public static final int VK_NUMPAD7 = 103;
  public static final int VK_NUMPAD8 = 104;
  public static final int VK_NUMPAD9 = 105;
  public static final int VK_KP_UP = 224;
  public static final int VK_KP_DOWN = 225;
  public static final int VK_KP_LEFT = 226;
  public static final int VK_KP_RIGHT = 227;
  public static final int VK_MULTIPLY = 106;
  public static final int VK_ADD = 107;
  public static final int VK_SUBTRACT = 109;
  public static final int VK_DECIMAL = 110;
  public static final int VK_DIVIDE = 111;
  public static final int VK_DELETE = 127;
  public static final int VK_CLEAR = 3;
  public static final int VK_NUM_LOCK = 144;
  public static final int VK_SCROLL_LOCK = 145;
  public static final int VK_F1 = 112;
  public static final int VK_F2 = 113;
  public static final int VK_F3 = 114;
  public static final int VK_F4 = 115;
  public static final int VK_F5 = 116;
  public static final int VK_F6 = 117;
  public static final int VK_F7 = 118;
  public static final int VK_F8 = 119;
  public static final int VK_F9 = 120;
  public static final int VK_F10 = 121;
  public static final int VK_F11 = 122;
  public static final int VK_F12 = 123;
  public static final int VK_F13 = 61440;
  public static final int VK_F14 = 61441;
  public static final int VK_F15 = 61442;
  public static final int VK_F16 = 61443;
  public static final int VK_F17 = 61444;
  public static final int VK_F18 = 61445;
  public static final int VK_F19 = 61446;
  public static final int VK_F20 = 61447;
  public static final int VK_F21 = 61448;
  public static final int VK_F22 = 61449;
  public static final int VK_F23 = 61450;
  public static final int VK_F24 = 61451;
  public static final int VK_PRINTSCREEN = 154;
  public static final int VK_INSERT = 155;
  public static final int VK_HELP = 156;
  public static final int VK_PAGE_UP = 33;
  public static final int VK_PAGE_DOWN = 34;
  public static final int VK_HOME = 36;
  public static final int VK_END = 35;
  public static final int VK_QUOTE = 222;
  public static final int VK_BACK_QUOTE = 192;
  public static final int VK_BEGIN = 65368;
  public static final char VK_UNDEFINED = '\000';

  public NativeKeyEvent(int paramInt1, long paramLong, int paramInt2, int paramInt3, int paramInt4)
  {
    super(GlobalScreen.getInstance(), paramInt1, paramLong, paramInt2);
    this.rawCode = paramInt3;
    this.keyCode = paramInt4;
  }

  public NativeKeyEvent(int paramInt1, long paramLong, int paramInt2, int paramInt3, int paramInt4, int paramInt5)
  {
    this(paramInt1, paramLong, paramInt2, paramInt3, paramInt4);
    this.keyLocation = paramInt5;
  }

  public int getRawCode()
  {
    return this.rawCode;
  }

  public void setRawCode(int paramInt)
  {
    this.rawCode = paramInt;
  }

  public int getKeyCode()
  {
    return this.keyCode;
  }

  public void setKeyCode(int paramInt)
  {
    this.keyCode = paramInt;
  }

  public int getKeyLocation()
  {
    return this.keyLocation;
  }

  public static String getKeyText(int paramInt)
  {
    String str = "";
    switch (paramInt)
    {
    case 65:
    case 66:
    case 67:
    case 68:
    case 69:
    case 70:
    case 71:
    case 72:
    case 73:
    case 74:
    case 75:
    case 76:
    case 77:
    case 78:
    case 79:
    case 80:
    case 81:
    case 82:
    case 83:
    case 84:
    case 85:
    case 86:
    case 87:
    case 88:
    case 89:
    case 90:
      return String.valueOf((char)paramInt);
    case 96:
    case 97:
    case 98:
    case 99:
    case 100:
    case 101:
    case 102:
    case 103:
    case 104:
    case 105:
      str = str + Toolkit.getProperty("AWT.numpad", "NumPad") + " ";
      paramInt -= 48;
    case 48:
    case 49:
    case 50:
    case 51:
    case 52:
    case 53:
    case 54:
    case 55:
    case 56:
    case 57:
      return str + String.valueOf((char)paramInt);
    case 10:
      return Toolkit.getProperty("AWT.enter", "Enter");
    case 8:
      return Toolkit.getProperty("AWT.backSpace", "Backspace");
    case 9:
      return Toolkit.getProperty("AWT.tab", "Tab");
    case 16:
      return Toolkit.getProperty("AWT.shift", "Shift");
    case 17:
      return Toolkit.getProperty("AWT.control", "Control");
    case 18:
      return Toolkit.getProperty("AWT.alt", "Alt");
    case 157:
      return Toolkit.getProperty("AWT.meta", "Meta");
    case 524:
      return Toolkit.getProperty("AWT.windows", "Windows");
    case 525:
      return Toolkit.getProperty("AWT.context", "Context Menu");
    case 19:
      return Toolkit.getProperty("AWT.pause", "Pause");
    case 20:
      return Toolkit.getProperty("AWT.capsLock", "Caps Lock");
    case 27:
      return Toolkit.getProperty("AWT.escape", "Escape");
    case 32:
      return Toolkit.getProperty("AWT.space", "Space");
    case 38:
      return Toolkit.getProperty("AWT.up", "Up");
    case 40:
      return Toolkit.getProperty("AWT.down", "Down");
    case 37:
      return Toolkit.getProperty("AWT.left", "Left");
    case 39:
      return Toolkit.getProperty("AWT.right", "Right");
    case 44:
      return Toolkit.getProperty("AWT.comma", "Comma");
    case 45:
      return Toolkit.getProperty("AWT.minus", "Minus");
    case 46:
      return Toolkit.getProperty("AWT.period", "Period");
    case 47:
      return Toolkit.getProperty("AWT.slash", "Slash");
    case 61:
      return Toolkit.getProperty("AWT.equals", "Equals");
    case 59:
      return Toolkit.getProperty("AWT.semicolon", "Semicolon");
    case 91:
      return Toolkit.getProperty("AWT.openBracket", "Open Bracket");
    case 92:
      return Toolkit.getProperty("AWT.backSlash", "Back Slash");
    case 93:
      return Toolkit.getProperty("AWT.closeBracket", "Close Bracket");
    case 224:
      return Toolkit.getProperty("AWT.up", "Up");
    case 225:
      return Toolkit.getProperty("AWT.down", "Down");
    case 226:
      return Toolkit.getProperty("AWT.left", "Left");
    case 227:
      return Toolkit.getProperty("AWT.right", "Right");
    case 106:
      return Toolkit.getProperty("AWT.multiply", "NumPad *");
    case 107:
      return Toolkit.getProperty("AWT.add", "NumPad +");
    case 109:
      return Toolkit.getProperty("AWT.subtract", "NumPad -");
    case 110:
      return Toolkit.getProperty("AWT.decimal", "NumPad .");
    case 111:
      return Toolkit.getProperty("AWT.divide", "NumPad /");
    case 127:
      return Toolkit.getProperty("AWT.delete", "Delete");
    case 144:
      return Toolkit.getProperty("AWT.numLock", "Num Lock");
    case 3:
      return Toolkit.getProperty("AWT.clear", "Clear");
    case 145:
      return Toolkit.getProperty("AWT.scrollLock", "Scroll Lock");
    case 112:
      return Toolkit.getProperty("AWT.f1", "F1");
    case 113:
      return Toolkit.getProperty("AWT.f2", "F2");
    case 114:
      return Toolkit.getProperty("AWT.f3", "F3");
    case 115:
      return Toolkit.getProperty("AWT.f4", "F4");
    case 116:
      return Toolkit.getProperty("AWT.f5", "F5");
    case 117:
      return Toolkit.getProperty("AWT.f6", "F6");
    case 118:
      return Toolkit.getProperty("AWT.f7", "F7");
    case 119:
      return Toolkit.getProperty("AWT.f8", "F8");
    case 120:
      return Toolkit.getProperty("AWT.f9", "F9");
    case 121:
      return Toolkit.getProperty("AWT.f10", "F10");
    case 122:
      return Toolkit.getProperty("AWT.f11", "F11");
    case 123:
      return Toolkit.getProperty("AWT.f12", "F12");
    case 61440:
      return Toolkit.getProperty("AWT.f13", "F13");
    case 61441:
      return Toolkit.getProperty("AWT.f14", "F14");
    case 61442:
      return Toolkit.getProperty("AWT.f15", "F15");
    case 61443:
      return Toolkit.getProperty("AWT.f16", "F16");
    case 61444:
      return Toolkit.getProperty("AWT.f17", "F17");
    case 61445:
      return Toolkit.getProperty("AWT.f18", "F18");
    case 61446:
      return Toolkit.getProperty("AWT.f19", "F19");
    case 61447:
      return Toolkit.getProperty("AWT.f20", "F20");
    case 61448:
      return Toolkit.getProperty("AWT.f21", "F21");
    case 61449:
      return Toolkit.getProperty("AWT.f22", "F22");
    case 61450:
      return Toolkit.getProperty("AWT.f23", "F23");
    case 61451:
      return Toolkit.getProperty("AWT.f24", "F24");
    case 154:
      return Toolkit.getProperty("AWT.printScreen", "Print Screen");
    case 155:
      return Toolkit.getProperty("AWT.insert", "Insert");
    case 156:
      return Toolkit.getProperty("AWT.help", "Help");
    case 33:
      return Toolkit.getProperty("AWT.pgup", "Page Up");
    case 34:
      return Toolkit.getProperty("AWT.pgdn", "Page Down");
    case 36:
      return Toolkit.getProperty("AWT.home", "Home");
    case 35:
      return Toolkit.getProperty("AWT.end", "End");
    case 222:
      return Toolkit.getProperty("AWT.quote", "Quote");
    case 192:
      return Toolkit.getProperty("AWT.backQuote", "Back Quote");
    case 65368:
      return Toolkit.getProperty("AWT.begin", "Begin");
    case 0:
      return Toolkit.getProperty("AWT.undefined", "Undefined");
    }
    return Toolkit.getProperty("AWT.unknown", "Unknown") + " keyCode: 0x" + Integer.toString(paramInt, 16);
  }

  public String paramString()
  {
    StringBuilder localStringBuilder = new StringBuilder(255);
    switch (getID())
    {
    case 2400:
      localStringBuilder.append("NATIVE_KEY_PRESSED");
      break;
    case 2401:
      localStringBuilder.append("NATIVE_KEY_RELEASED");
      break;
    default:
      localStringBuilder.append("unknown type");
    }
    localStringBuilder.append(',');
    localStringBuilder.append("keyCode=");
    localStringBuilder.append(this.keyCode);
    localStringBuilder.append(',');
    localStringBuilder.append("keyText=");
    localStringBuilder.append(getKeyText(this.keyCode));
    localStringBuilder.append(',');
    if (getModifiers() != 0)
    {
      localStringBuilder.append("modifiers=");
      localStringBuilder.append(getModifiersText(getModifiers()));
      localStringBuilder.append(',');
    }
    localStringBuilder.append("keyLocation=");
    switch (this.keyLocation)
    {
    case 0:
      localStringBuilder.append("KEY_LOCATION_UNKNOWN");
      break;
    case 1:
      localStringBuilder.append("KEY_LOCATION_STANDARD");
      break;
    case 2:
      localStringBuilder.append("KEY_LOCATION_LEFT");
      break;
    case 3:
      localStringBuilder.append("KEY_LOCATION_RIGHT");
      break;
    case 4:
      localStringBuilder.append("KEY_LOCATION_NUMPAD");
      break;
    default:
      localStringBuilder.append("KEY_LOCATION_UNKNOWN");
    }
    localStringBuilder.append(',');
    localStringBuilder.append("rawCode=");
    localStringBuilder.append(this.rawCode);
    return localStringBuilder.toString();
  }
}

/* Location:           D:\Downloads\JNativeHook\jar\JNativeHook.jar
 * Qualified Name:     org.jnativehook.keyboard.NativeKeyEvent
 * JD-Core Version:    0.6.0
 */